package com.atguigu.day05;

public class Test07 {
    public static void main(String[] args) {
        int[] arr = new int[]{1, 2, 3, 4, 3, 2, 1};
        int[] subarr = new int[]{1, 2, 3, 4, 3, 2, 1};
        boolean issame = true;
        System.out.print("是否一致:");
        if (arr.length == subarr.length) {
            for (int i = 0; i < arr.length; i++) {
                if (arr[i] != subarr[i]) {
                    issame = false;
                    break;
                }
            }
            if (issame)
                System.out.println(true);
            else
                System.out.println(false);
        } else
            System.out.println(false);
    }
}
